<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>竞赛题库管理管理</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			//$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
<ul class="nav nav-tabs">
	<li><a href="${ctx}/race/raceRepertory/">竞赛题库列表</a></li>
	<li class="active"><a href="${ctx}/race/raceRepertory/form?id=${raceRepertory.id}">竞赛题库详情<shiro:hasPermission name="race:raceRepertory:edit">${not empty raceRepertory.id?'':''}</shiro:hasPermission><shiro:lacksPermission name="race:raceRepertory:edit">查看</shiro:lacksPermission></a></li>
</ul><br/>
<form:form id="inputForm" modelAttribute="raceRepertory" action="${ctx}/race/raceRepertory/save" method="post" class="form-horizontal">
	<form:hidden path="id"/>
	<sys:message content="${message}"/>





	<div class="control-group">
		<label class="control-label">题库名称：</label>
		<div class="controls">
				${raceRepertory.repertoryName}
		</div>
	</div>



	<div class="control-group">
		<label class="control-label">题库详情：</label>
		<div class="controls">
				${raceRepertory.repertoryDetail}
		</div>
	</div>



	<div class="control-group">
		<label class="control-label">ctf题目库：</label>
		<div class="controls">


			<table id="contentTable" class="table table-striped table-bordered table-condensed">
				<thead>
				<tr>
					<th>题目名称</th>
					<th>难度</th>
					<th>类型标签</th>
					<th>分值</th>
					<th>基本提示</th>

				</tr>
				</thead>
				<tbody>


					<c:forEach items="${raceSubject}" var="raceSubject">
								<tr>
									<td>${raceSubject.ctfSubjectName}</td>
									<td>${fns:getDictLabel(raceSubject.difficulty, 'resource_question_difficulty', '')}</td>
									<td>

										<c:forEach items="${ctfSubjectTypeList}" var="ctfSubjectType">

											<%--cid:	${ctfSubjectType.id} --<br> iod: ${ raceSubject.ctfSubjectTypeId}--%>

											<c:if test="${ctfSubjectType.id == raceSubject.type}">
											${ctfSubjectType.subjectTypeName}
											</c:if>
										</c:forEach>

									</td>
									<td>${raceSubject.score}</td>
									<td>${raceSubject.tip}</td>
								</tr>
					</c:forEach>

				</tbody>
			</table>










		</div>
	</div>
















	<div class="form-actions">
		<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
	</div>
</form:form>
</body>
</html>